/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jumavidesktop.GUI;

import java.util.List;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import jumavidesktop.ArrancaMDI;
import jumavidesktop.GUI.mensajeModal.MensajeInfoError;
import jumavidesktop.Otros.Pojos.MyRespuesta;
import jumavidesktop.Otros.Pojos.parConfig;
import jumavidesktop.Otros.auxiliares.AuxConex;

/**
 *
 * @author vimso
 */
public class Configuracion extends javax.swing.JFrame {
    
    private ArrancaMDI  arrancadora;

    /**
     * Creates new form Configuracion
     */
    public Configuracion() {
        initComponents();
        this.setIconImage(new javax.swing.ImageIcon(getClass().getResource("/jumavidesktop/recursos/iconos/config.png")).getImage());
                    
        parConfig parametrosConfig = new parConfig();
        parametrosConfig.cargarConfig();

        this.pintarValoresControles(parametrosConfig);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnPadre = new javax.swing.JPanel();
        tabPanel = new javax.swing.JTabbedPane();
        pnTabBBDD = new javax.swing.JPanel();
        pnCamposBBDD = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txUrlBBDD = new javax.swing.JTextField();
        txUsuario = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txClaveDeAcceso = new javax.swing.JPasswordField();
        pnBotonesBBDD = new javax.swing.JPanel();
        pnMensaje = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        lbImagen = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        lbMensaje = new javax.swing.JLabel();
        btPing = new javax.swing.JButton();
        pnBotones = new javax.swing.JPanel();
        btCancelar = new javax.swing.JButton();
        btGuardar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Configuración");
        setResizable(false);

        jLabel1.setText("Url de la base de datos:");

        jLabel2.setText("Usuario BBDD:");

        jLabel3.setText("clave de acceso:");

        javax.swing.GroupLayout pnCamposBBDDLayout = new javax.swing.GroupLayout(pnCamposBBDD);
        pnCamposBBDD.setLayout(pnCamposBBDDLayout);
        pnCamposBBDDLayout.setHorizontalGroup(
            pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnCamposBBDDLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(pnCamposBBDDLayout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txUrlBBDD, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnCamposBBDDLayout.createSequentialGroup()
                        .addGroup(pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txClaveDeAcceso, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(45, Short.MAX_VALUE))
        );
        pnCamposBBDDLayout.setVerticalGroup(
            pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnCamposBBDDLayout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txUrlBBDD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnCamposBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txClaveDeAcceso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(23, Short.MAX_VALUE))
        );

        pnBotonesBBDD.setLayout(null);

        lbImagen.setMaximumSize(new java.awt.Dimension(24, 24));
        lbImagen.setMinimumSize(new java.awt.Dimension(24, 24));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 82, Short.MAX_VALUE)
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGap(0, 41, Short.MAX_VALUE)
                    .addComponent(lbImagen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 41, Short.MAX_VALUE)))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 60, Short.MAX_VALUE)
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGap(0, 18, Short.MAX_VALUE)
                    .addComponent(lbImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 18, Short.MAX_VALUE)))
        );

        lbMensaje.setAutoscrolls(true);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(lbMensaje, javax.swing.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lbMensaje, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout pnMensajeLayout = new javax.swing.GroupLayout(pnMensaje);
        pnMensaje.setLayout(pnMensajeLayout);
        pnMensajeLayout.setHorizontalGroup(
            pnMensajeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnMensajeLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnMensajeLayout.setVerticalGroup(
            pnMensajeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnMensajeLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnMensajeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        pnBotonesBBDD.add(pnMensaje);
        pnMensaje.setBounds(0, 0, 400, 60);

        btPing.setText("Probar conexión");
        btPing.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btPingActionPerformed(evt);
            }
        });
        pnBotonesBBDD.add(btPing);
        btPing.setBounds(200, 70, 180, 23);

        javax.swing.GroupLayout pnTabBBDDLayout = new javax.swing.GroupLayout(pnTabBBDD);
        pnTabBBDD.setLayout(pnTabBBDDLayout);
        pnTabBBDDLayout.setHorizontalGroup(
            pnTabBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnTabBBDDLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnTabBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnTabBBDDLayout.createSequentialGroup()
                        .addComponent(pnBotonesBBDD, javax.swing.GroupLayout.PREFERRED_SIZE, 406, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 5, Short.MAX_VALUE))
                    .addComponent(pnCamposBBDD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnTabBBDDLayout.setVerticalGroup(
            pnTabBBDDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnTabBBDDLayout.createSequentialGroup()
                .addComponent(pnCamposBBDD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnBotonesBBDD, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(38, Short.MAX_VALUE))
        );

        tabPanel.addTab("Conexion a base de datos", pnTabBBDD);

        javax.swing.GroupLayout pnPadreLayout = new javax.swing.GroupLayout(pnPadre);
        pnPadre.setLayout(pnPadreLayout);
        pnPadreLayout.setHorizontalGroup(
            pnPadreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnPadreLayout.createSequentialGroup()
                .addComponent(tabPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 436, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 3, Short.MAX_VALUE))
        );
        pnPadreLayout.setVerticalGroup(
            pnPadreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnPadreLayout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(tabPanel)
                .addContainerGap())
        );

        btCancelar.setText("Cancelar");
        btCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btCancelarActionPerformed(evt);
            }
        });

        btGuardar.setText("Guardar");
        btGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btGuardarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnBotonesLayout = new javax.swing.GroupLayout(pnBotones);
        pnBotones.setLayout(pnBotonesLayout);
        pnBotonesLayout.setHorizontalGroup(
            pnBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnBotonesLayout.createSequentialGroup()
                .addContainerGap(212, Short.MAX_VALUE)
                .addComponent(btGuardar)
                .addGap(18, 18, 18)
                .addComponent(btCancelar)
                .addGap(44, 44, 44))
        );
        pnBotonesLayout.setVerticalGroup(
            pnBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnBotonesLayout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addGroup(pnBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btCancelar)
                    .addComponent(btGuardar))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnPadre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(pnBotones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnPadre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(pnBotones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btPingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPingActionPerformed
        // realizo un ping, muestro el mensaje y el icono 
        MyRespuesta respuestaAux= AuxConex.probarConexionBBDD(this.recogerValoresControles());
        
        if (respuestaAux.getTodoOK()) {
            this.conexionCorrecta();
        } else {
            this.conexionErronea(respuestaAux.getMensajes().get(0));
        }
        
    }//GEN-LAST:event_btPingActionPerformed

    private void btCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCancelarActionPerformed
        System.exit(0);
    }//GEN-LAST:event_btCancelarActionPerformed

    private void btGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btGuardarActionPerformed
        //Guardo la configuracion
        parConfig parametros= this.recogerValoresControles();
        MyRespuesta respuesta= parametros.guardaConfig();
        if (respuesta.getTodoOK()) {
            //Limpio el mensaje 
            this.lbImagen.setIcon(null);
            this.lbMensaje.setText("");
            if (this.getArrancadora() != null) {
                this.arrancadora.arrancaMDI();
            }
            this.dispose();

        }
        else
        {
            //llamo a un mensaje 
            MensajeInfoError msg= new MensajeInfoError(this,true,respuesta.getMensajes(), MensajeInfoError.TipoMensaje.ERROR,"Error al guardar el fichero");
            msg.setLocationRelativeTo(null); //para centrar el form
            msg.setVisible(Boolean.TRUE);
        }
    }//GEN-LAST:event_btGuardarActionPerformed

    private void conexionCorrecta()
    {
        this.lbMensaje.setText("Conexión realizada con exito");
        lbImagen.setSize(24, 24);
        lbImagen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jumavidesktop/recursos/iconos/correcto24.png"))); // NOI18N
        
    }

    private void conexionErronea(String error)
    {
        this.lbMensaje.setText(error);
        lbImagen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jumavidesktop/recursos/iconos/Erro24.png"))); // NOI18N
    }
    
    private void pintarValoresControles(parConfig parametros)
    {
        this.txClaveDeAcceso.setText(parametros.getClave());
        this.txUrlBBDD.setText(parametros.getUrlBBDD());
        this.txUsuario.setText(parametros.getUsuario());
        
    }
    private parConfig recogerValoresControles()
    {
        parConfig parametros= new parConfig();
        
        parametros.setClave(new String(this.txClaveDeAcceso.getPassword()));
        parametros.setUrlBBDD(this.txUrlBBDD.getText());
        parametros.setUsuario(this.txUsuario.getText());
        
        return parametros;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCancelar;
    private javax.swing.JButton btGuardar;
    private javax.swing.JButton btPing;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JLabel lbImagen;
    private javax.swing.JLabel lbMensaje;
    private javax.swing.JPanel pnBotones;
    private javax.swing.JPanel pnBotonesBBDD;
    private javax.swing.JPanel pnCamposBBDD;
    private javax.swing.JPanel pnMensaje;
    private javax.swing.JPanel pnPadre;
    private javax.swing.JPanel pnTabBBDD;
    private javax.swing.JTabbedPane tabPanel;
    private javax.swing.JPasswordField txClaveDeAcceso;
    private javax.swing.JTextField txUrlBBDD;
    private javax.swing.JTextField txUsuario;
    // End of variables declaration//GEN-END:variables

    public ArrancaMDI getArrancadora() {
        return arrancadora;
    }

    public void setArrancadora(ArrancaMDI arrancadora) {
        this.arrancadora = arrancadora;
    }

    public JButton getBtCancelar() {
        return btCancelar;
    }

    public void setBtCancelar(JButton btCancelar) {
        this.btCancelar = btCancelar;
    }

    public JButton getBtGuardar() {
        return btGuardar;
    }

    public void setBtGuardar(JButton btGuardar) {
        this.btGuardar = btGuardar;
    }

    public JButton getBtPing() {
        return btPing;
    }

    public void setBtPing(JButton btPing) {
        this.btPing = btPing;
    }

    public JLabel getjLabel1() {
        return jLabel1;
    }

    public void setjLabel1(JLabel jLabel1) {
        this.jLabel1 = jLabel1;
    }

    public JLabel getjLabel2() {
        return jLabel2;
    }

    public void setjLabel2(JLabel jLabel2) {
        this.jLabel2 = jLabel2;
    }

    public JLabel getjLabel3() {
        return jLabel3;
    }

    public void setjLabel3(JLabel jLabel3) {
        this.jLabel3 = jLabel3;
    }

    public JPanel getjPanel1() {
        return jPanel1;
    }

    public void setjPanel1(JPanel jPanel1) {
        this.jPanel1 = jPanel1;
    }

    public JPanel getjPanel2() {
        return jPanel2;
    }

    public void setjPanel2(JPanel jPanel2) {
        this.jPanel2 = jPanel2;
    }

    public JLabel getLbImagen() {
        return lbImagen;
    }

    public void setLbImagen(JLabel lbImagen) {
        this.lbImagen = lbImagen;
    }

    public JLabel getLbMensaje() {
        return lbMensaje;
    }

    public void setLbMensaje(JLabel lbMensaje) {
        this.lbMensaje = lbMensaje;
    }

    public JPanel getPnBotones() {
        return pnBotones;
    }

    public void setPnBotones(JPanel pnBotones) {
        this.pnBotones = pnBotones;
    }

    public JPanel getPnBotonesBBDD() {
        return pnBotonesBBDD;
    }

    public void setPnBotonesBBDD(JPanel pnBotonesBBDD) {
        this.pnBotonesBBDD = pnBotonesBBDD;
    }

    public JPanel getPnCamposBBDD() {
        return pnCamposBBDD;
    }

    public void setPnCamposBBDD(JPanel pnCamposBBDD) {
        this.pnCamposBBDD = pnCamposBBDD;
    }

    public JPanel getPnMensaje() {
        return pnMensaje;
    }

    public void setPnMensaje(JPanel pnMensaje) {
        this.pnMensaje = pnMensaje;
    }

    public JPanel getPnPadre() {
        return pnPadre;
    }

    public void setPnPadre(JPanel pnPadre) {
        this.pnPadre = pnPadre;
    }

    public JPanel getPnTabBBDD() {
        return pnTabBBDD;
    }

    public void setPnTabBBDD(JPanel pnTabBBDD) {
        this.pnTabBBDD = pnTabBBDD;
    }

    public JTabbedPane getTabPanel() {
        return tabPanel;
    }

    public void setTabPanel(JTabbedPane tabPanel) {
        this.tabPanel = tabPanel;
    }

    public JPasswordField getTxClaveDeAcceso() {
        return txClaveDeAcceso;
    }

    public void setTxClaveDeAcceso(JPasswordField txClaveDeAcceso) {
        this.txClaveDeAcceso = txClaveDeAcceso;
    }

    public JTextField getTxUrlBBDD() {
        return txUrlBBDD;
    }

    public void setTxUrlBBDD(JTextField txUrlBBDD) {
        this.txUrlBBDD = txUrlBBDD;
    }

    public JTextField getTxUsuario() {
        return txUsuario;
    }

    public void setTxUsuario(JTextField txUsuario) {
        this.txUsuario = txUsuario;
    }
    

}
